package com.vodone.v1pin.index.delegate
{
	
	import com.vodone.v1pin.index.vo.PicVO;
	public class PicConvertUtil
	{
		public static function getPicList( obj:Object ):Array
		{
			var temp:Array = [];
			var list:Array;
			var level:int = 0;
			if( obj.hasOwnProperty("data") )
			{
				list = obj["data"];
				var len:int = list.length;
				for( var i:int = 0 ; i < len ; i++ ){
					temp.push( getPic( list[i] ) );
				}
			}
			
			return temp;
		}
		
		public static function getPic( obj:Object ):PicVO
		{
			var vo:PicVO = new PicVO();
			if( obj.hasOwnProperty("url") )
			{
				vo.url = obj["url"];
			}
			if( obj.hasOwnProperty("smallPicUrl") )
			{
				vo.smallPicUrl = obj["smallPicUrl"];
			}
			if( obj.hasOwnProperty("id") )
			{
				vo.id = obj["id"];
			}
			if( obj.hasOwnProperty("discripte") )
			{
				vo.discripte = obj["discripte"];
			}
			if( obj.hasOwnProperty("navUrl") )
			{
				vo.navUrl = obj["navUrl"];
			}
			if( obj.hasOwnProperty("type") )
			{
				vo.type = obj["type"];
			}
			if( obj.hasOwnProperty("v1pinPrice") )
			{
				vo.v1pinPrice = obj["v1pinPrice"];
			}
			if( obj.hasOwnProperty("name") )
			{
				vo.name = obj["name"];
			}
			if( obj.hasOwnProperty("CName") )
			{
				vo.cname = obj["CName"];
			}
			if( obj.hasOwnProperty("EName") )
			{
				vo.ename = obj["EName"];
			}
			if( obj.hasOwnProperty("price") )
			{
				vo.price = obj["price"];
			}
			if( obj.hasOwnProperty("subApp") )
			{
				vo.subApp = obj["subApp"];
			}
			if( obj.hasOwnProperty("imgW") )
			{
				vo.imgWidth = obj["imgW"];
			}
			if( obj.hasOwnProperty("imgH") )
			{
				vo.imgHeight = obj["imgH"];
			}
			if( obj.hasOwnProperty("pic") )
			{
				vo.url = obj["pic"];
			}
			if( obj.hasOwnProperty("htmlDescript") )
			{
				vo.htmlDescript = obj["htmlDescript"];
			}
			
			return vo;
		}
	}
}